package model;
import db.DB;

import java.io.Serializable;
import java.sql.Date;
//销售订单
public class sale_list implements Serializable {
    private int Sale_List_id;
    private Date Sale_List_date;
    private double Sale_List_amount;
    private byte state;
    private int Customer_id;
    private int User_id;
    private String remarks;

    public int getSale_List_id() {return Sale_List_id;}
    public Date getSale_List_date() {return Sale_List_date;}
    public double getSale_List_amount() {return Sale_List_amount;}
    public byte getstate() {return state;}
    public int getCustomer_id() {return Customer_id;}
    public int getUser_id() {return User_id;}
    public String getRemarks() {return remarks;}

    public String getstate_show(){
        if (state==1)return "是";
        else return "否";
    }
    public String showdetail1(){
        return "订单编号："+Sale_List_id+" &nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp\n" +
                "日期："+Sale_List_date+" &nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp\n" +
                "总价："+Sale_List_amount+"&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp\n" +
                "是否入账："+getstate_show();
    }
    public String showdetail2(){
        return "客户："+new DB().findcustomername(Customer_id)+"&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp\n" +
                "操作员编号："+User_id+"&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp\n" +
                "备注："+remarks;
    }
    public String getcustomer_show(){
        return new DB().findcustomername(Customer_id);
    }

    public void setSale_List_id(int sale_List_id) {Sale_List_id = sale_List_id;}
    public void setSale_List_date(Date sale_List_date) {Sale_List_date = sale_List_date;}
    public void setSale_List_amount(double sale_List_amount) {Sale_List_amount = sale_List_amount;}
    public void setstate(byte state) {this.state = state;}
    public void setCustomer_id(int customer_id) {Customer_id = customer_id;}
    public void setUser_id(int user_id) {User_id = user_id;}
    public void setRemarks(String remarks) {this.remarks = remarks;}
}
